﻿using ConfExpert.Forms.Base;
using DevTeam;
using System;

namespace ConfExpert.Forms.Depo.Westbrook
{
    public partial class Fiyatlar : XForm
    {
        public Fiyatlar()
        {
            InitializeComponent();
        }

        private void Fiyatlar_Load(object sender, EventArgs e)
        {
            gridView1.Init("GetWBPrices");
            gridView1.FormatAsNumber(1, "Qty");
            gridView1.AddSummary("Qty");
            gridView1.BestFitColumns();
            gridView1.MakeReadOnly("StokGrupId");

            btnKaydet.ItemClick += btnKaydet_ItemClick;
        }

        void btnKaydet_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            gridView1.EndEditing();
            ExecuteNonQuery("UpdWBPrices", gridView1.SerializeChanges());
            Notify("Kaydedildi");
        }
    }
}
